<#-- 生成为表添加字段的SQL

ALTER TABLE ${tableInfo.tableName} ADD COLUMN ${fieldInfo.colName} ${fieldInfo.dataTypeStr} NULL COMMENT '${fieldInfo.remark}';  
 -->
<#if tableInfo.fieldInfos?? && tableInfo.fieldInfos?size gt 0>
    <#list tableInfo.fieldInfos as fieldInfo>
    <#if fieldInfo.remark?split("、")?size gt 1>
     列名为：  ${fieldInfo.originalColName}    【${fieldInfo.dataTypeStr}】    ${fieldInfo.tableName}    	  
public class ${tableInfo.firstUpperCase}cons{

		
	public enum  ${fieldInfo.upperColName}   {

	    <#list fieldInfo.remark?split("\n") as s>
	    		${s?split("、")[2]}(${s?split("、")[0]},"${s?split("、")[1]}"),
		</#list>
		;
        Integer code;
        String msg;

        ${fieldInfo.upperColName}(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public static String codeMsg(Integer code) {
            for (${fieldInfo.upperColName} k : ${fieldInfo.upperColName}.values()) {
                if (k.code == code) {
                    return k.msg;
                }
            }
            return null;
        }


	}
}
	</#if>
    </#list>
</#if>


